const months = [
  '1月', '2月', '3月', '4月', '5月', '6月',
  '7月', '8月', '9月', '10月', '11月', '12月'
]
const rand = (start = 1, end = 100) => {
  return Math.round(Math.random() * (end - start) + start)
}
export function createObject (years) {
  return years.reduce((acc, v) => {
    acc[v] = months.map(() => rand())
    return acc
  }, {})
}
export default function createDataset (years) {
  return months.reduce((acc, v) => {
    const array = [v]
    years.forEach(() => {
      array.push(rand())
    })
    acc = acc.concat([array])
    return acc
  }, [['months', ...years]])
}
